home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’91 / AliasThis! / AliasThisƒ / src / Sample.r < prev    next >
Encoding:
Text File  |  1991-02-09  |  30.7 KB  |  960 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    MultiFinder-Aware Simple Sample Application
  6. #
  7. #    Sample
  8. #
  9. #    Sample.r    -    Rez Source
  10. #
  11. #    Copyright © 1989-1991 Apple Computer, Inc.
  12. #    All rights reserved.
  13. #
  14. #    Versions:
  15. #                1.00                08/88
  16. #                1.01                11/88
  17. #                1.02                04/89    MPW 3.1
  18. #                2.00                02/91    7.0 Happy
  19. #
  20. ------------------------------------------------------------------------------*/
  21.  
  22.  
  23. #include "Types.r"
  24. #include "SysTypes.r"
  25. #include "BalloonTypes.r"
  26. #include "Sample.h"
  27.  
  28.  
  29. /* we use an MBAR resource to conveniently load all the menus */
  30.  
  31. resource 'MBAR' (rMenuBar, preload) {
  32.     { mApple, mFile, mEdit, mLight,mSendEvent };    /* four menus */
  33. };
  34.  
  35.  
  36. resource 'MENU' (mApple, preload) {
  37.     mApple, textMenuProc,
  38.     AllItems & ~MenuItem2,    /* Disable dashed line, enable About and DAs */
  39.     enabled, apple,
  40.     {
  41.         "About Traffic Light 2.0…",    noicon, nokey, nomark, plain;
  42.         "-",                        noicon, nokey, nomark, plain
  43.     }
  44. };
  45.  
  46. resource 'MENU' (mFile, preload) {
  47.     mFile, textMenuProc,
  48.     MenuItem12 | MenuItem4 | MenuItem5 | MenuItem9 | MenuItem10,
  49.     enabled, "File",
  50.     {
  51.         "New",            noicon, "N", nomark, plain;
  52.         "Open…",        noicon, "O", nomark, plain;
  53.         "-",            noicon, nokey, nomark, plain;
  54.         "Close",        noicon, "W", nomark, plain;
  55.         "Save",            noicon, "S", nomark, plain;
  56.         "Save As…",        noicon, nokey, nomark, plain;
  57.         "Revert",        noicon, nokey, nomark, plain;
  58.         "-",            noicon, nokey, nomark, plain;
  59.         "Page Setup…",    noicon, nokey, nomark, plain;
  60.         "Print…",        noicon, nokey, nomark, plain;
  61.         "-",            noicon, nokey, nomark, plain;
  62.         "Quit",            noicon, "Q", nomark, plain
  63.     }
  64. };
  65.  
  66. resource 'MENU' (mEdit, preload) {
  67.     mEdit, textMenuProc,
  68.     NoItems,                /* disable everything, program does the enabling */
  69.     enabled, "Edit",
  70.      {
  71.         "Undo",            noicon, "Z", nomark, plain;
  72.         "-",            noicon, nokey, nomark, plain;
  73.         "Cut",            noicon, "X", nomark, plain;
  74.         "Copy",            noicon, "C", nomark, plain;
  75.         "Paste",        noicon, "V", nomark, plain;
  76.         "Clear",        noicon, nokey, nomark, plain
  77.     }
  78. };
  79.  
  80. resource 'MENU' (mLight, preload) {
  81.     mLight, textMenuProc,
  82.     NoItems,                /* disable everything, program does the enabling */
  83.     enabled, "Traffic",
  84.      {
  85.         "Red Light",    noicon, nokey, nomark, plain;
  86.         "Green Light",    noicon, nokey, nomark, plain
  87.     }
  88. };
  89.  
  90. resource 'MENU' (mSendEvent, preload) {
  91.     mSendEvent, textMenuProc,
  92.     NoItems,                /* disable everything, program does the enabling */
  93.     enabled, "Apple Events",
  94.      {
  95.         "Send messages to Self",        noicon, nokey, nomark, plain;
  96.         "-",                            noicon, nokey, nomark, plain;
  97.         "Send a close message",            noicon, nokey, nomark, plain;
  98.         "Send a MoveWindow message",    noicon, "M", nomark, plain;
  99.         "-",                            noicon, nokey, nomark, plain;
  100.         "Speed Test",                    noicon, "T", nomark, plain;
  101.         "Use “No Reply” mode",            noicon, "1", nomark, plain;
  102.         "Use “Wait Reply” mode",        noicon, "2", nomark, plain;
  103.         "Use “Queue Reply” mode",        noicon, "3", nomark, plain;
  104.     }
  105. };
  106.  
  107.  
  108.  
  109. /* this ALRT and DITL are used as an About screen */
  110.  
  111. resource 'ALRT' (rAboutAlert, purgeable) {
  112.     {40, 20, 160, 290},
  113.     rAboutAlert,
  114.     {
  115.         OK, visible, silent,
  116.         OK, visible, silent,
  117.         OK, visible, silent,
  118.         OK, visible, silent
  119.     }
  120. };
  121.  
  122. resource 'DLOG' (ERR_DLOG_ID, purgeable) {
  123.     {40, 20, 240, 290},
  124.     dBoxProc,
  125.     invisible,
  126.     noGoAway,
  127.     0,
  128.     ERR_DLOG_ID,
  129.     "No Name City"
  130. };
  131.  
  132. resource 'DITL' (ERR_DLOG_ID, purgeable) {
  133.     {
  134.         {176, 180, 196, 260},    Button { enabled, "OK" },
  135.         {5, 4, 170, 265},        UserItem { disabled },
  136.     }
  137. };
  138.  
  139.  
  140. resource 'DLOG' (ELAPSED_DLOG_ID,purgeable) {
  141.     {40, 20, 240, 290},
  142.     dBoxProc,
  143.     invisible,
  144.     noGoAway,
  145.     0,
  146.     ELAPSED_DLOG_ID,
  147.     "No Name City"
  148. };
  149.  
  150. resource 'DITL' (ELAPSED_DLOG_ID, purgeable) {
  151.     {
  152.         {176, 180, 196, 260},    Button { enabled, "OK" },
  153.         {4, 4, 170, 265},        StaticText { disabled, "^0^1" },
  154.     }
  155. };
  156.  
  157.  
  158. resource 'DITL' (rAboutAlert, purgeable) {
  159.     { /* array DITLarray: 5 elements */
  160.         {88, 180, 108, 260},    Button { enabled, "OK" },
  161.         {8, 8, 24, 260},        StaticText { disabled, "Traffic Light (6.0.x & 7.0 compatible)" },
  162.         {32, 8, 48, 260},        StaticText { disabled, "Copyright © 1988-91 Apple Computer" },
  163.         {56, 8, 72, 136},        StaticText { disabled, "Brought to you by:" },
  164.         {80, 24, 112, 167},        StaticText { disabled, "Macintosh Developer  Technical Support" }
  165.     }
  166. };
  167.  
  168.  
  169. /* this ALRT and DITL are used as an error screen */
  170.  
  171. resource 'ALRT' (rUserAlert, purgeable) {
  172.     {40, 20, 120, 260},
  173.     rUserAlert,
  174.     {
  175.         OK, visible, silent,
  176.         OK, visible, silent,
  177.         OK, visible, silent,
  178.         OK, visible, silent
  179.     }
  180. };
  181.  
  182.  
  183. resource 'DITL' (rUserAlert, purgeable) {
  184.     {
  185.         {50, 150, 70, 230},    Button { enabled, "OK" },
  186.         {10, 60, 30, 230},    StaticText { disabled, "Sample - Error occurred!" },
  187.         {8, 8, 40, 40},        Icon { disabled, 2 }
  188.     }
  189. };
  190.  
  191.  
  192. resource 'WIND' (rWindow, preload, purgeable) {
  193.     {60, 40, 290, 160},
  194.     noGrowDocProc, invisible, goAway, 0x0, "Traffic"
  195. };
  196.  
  197. resource 'RECT' (rStopRect, preload, purgeable) {
  198.     {10, 10, 110, 110}
  199. };
  200.  
  201. resource 'RECT' (rGoRect, preload, purgeable) {
  202.     {120, 10, 220, 110}
  203. };
  204.  
  205.  
  206. /* here is the quintessential MultiFinder friendliness device, the SIZE resource */
  207.  
  208. resource 'SIZE' (-1) {
  209.     dontSaveScreen,
  210.     acceptSuspendResumeEvents,
  211.     enableOptionSwitch,
  212.     canBackground,                /* Can properly use background null events    */
  213.     doesActivateOnFGSwitch,        /* We do our own activate/deactivate; don't fake us out */
  214.     backgroundAndForeground,    /* This is definitely not a background-only application! */
  215.     dontGetFrontClicks,            /* Change this is if you want "do first click" behavior like the Finder */
  216.     ignoreAppDiedEvents,        /* Essentially, I'm not a debugger (sub-launching) */
  217.     is32BitCompatible,            /* This app can be run in 32-bit address space */
  218.     isHighLevelEventAware,        /* does Post/AcceptHighLevelEvent */
  219.     localAndRemoteHLEvents,
  220.     notStationeryAware,
  221.     dontUseTextEditServices,
  222.     reserved,
  223.     reserved,
  224.     reserved,
  225.     kPrefSize * 1024,
  226.     kMinSize * 1024
  227. };
  228.  
  229. resource 'SIZE' (0) {
  230.     dontSaveScreen,
  231.     acceptSuspendResumeEvents,
  232.     enableOptionSwitch,
  233.     canBackground,                /* we can background; we don't currently, but our sleep value */
  234.                                 /* guarantees we don't hog the Mac while we are in the background */
  235.     doesActivateOnFGSwitch,            /* this says we do our own activate/deactivate; don't fake us out */
  236.     backgroundAndForeground,    /* this is definitely not a background-only application! */
  237.     dontGetFrontClicks,            /* change this is if you want "do first click" behavior like the Finder */
  238.     ignoreAppDiedEvents,        /* essentially, I'm not a debugger (sub-launching) */
  239.     not32BitCompatible,            /* this app should not be run in 32-bit address space */
  240.     isHighLevelEventAware,
  241.     localAndRemoteHLEvents,
  242.     notStationeryAware,
  243.     reserved,
  244.     reserved,
  245.     reserved,
  246.     reserved,
  247.     kPrefSize * 1024,
  248.     kMinSize * 1024
  249. };
  250.  
  251.  
  252.  
  253. resource 'STR#' (kMiscStrings, purgeable) {
  254.     {
  255.         "Save File As:",
  256.         "Untitled",
  257.     }
  258. };
  259.  
  260. resource 'STR#'(ERR_DLOG_ID, purgeable) {
  261.     {
  262. /* [1] */    "An Error has occurred.",
  263. /* [2] */    "Error #",
  264. /* [3] */    "what: ",
  265. /* [4] */    "message: ",
  266. /* [5] */    "msgID: ",
  267.     }
  268. };
  269.  
  270. resource 'STR#'(ELAPSED_DLOG_ID, purgeable) {
  271.     {
  272. /* [1] */    "Elapsed Time: ",
  273.     }
  274. };
  275.  
  276.  
  277. type 'DTS ' as 'STR ';
  278.  
  279. resource 'DTS ' (0) {
  280.     "Sample - Version 2.0 Modified for System 7.0"
  281. };
  282.  
  283. resource 'vers' (1, purgeable) {
  284.     0x02,
  285.     0x00,
  286.     beta,
  287.     0x02,
  288.     verUs,
  289.     "2.0 b2",
  290.     "2.0 b2, Sample - Modified for System 7.0"
  291. };
  292.  
  293. resource 'FREF' (129) {
  294.     'BOOL',
  295.     1,
  296.     ""
  297. };
  298.  
  299.  
  300. resource 'FREF' (128) {
  301.     'APPL',
  302.     0,
  303.     ""
  304. };
  305.  
  306.  
  307. resource 'BNDL' (128) {
  308.     'DTS ', 0, {
  309.         'ICN#', { 0, 128, 1, 129 },
  310.         'FREF', { 0, 128, 1, 129 }
  311.     }
  312. };
  313.  
  314. resource 'ICN#' (128) {
  315.     {
  316.         $"00FF F800 0100 0400 0200 0200 040F 0100"
  317.         $"041F 8100 043F C100 047F E100 04FF F100"
  318.         $"04FF F100 04FF F100 04FF F100 047F E100"
  319.         $"043F C100 041F 8100 040F 3F00 0400 4080"
  320.         $"0400 8040 040F 3020 0411 C810 042E 7F8F"
  321.         $"0442 3007 0481 0007 0480 8007 0480 6007"
  322.         $"0480 1FE7 0440 211F 0420 4107 0410 8100"
  323.         $"040F 0100 0200 0200 0100 0400 00FF F800",
  324.  
  325.         $"00FF F800 01FF FC00 03FF FE00 07FF FF00"
  326.         $"07FF FF00 07FF FF00 07FF FF00 07FF FF00"
  327.         $"07FF FF00 07FF FF00 07FF FF00 07FF FF00"
  328.         $"07FF FF00 07FF FF00 07FF FF00 07FF FF80"
  329.         $"07FF FFC0 07FF FFE0 07FF FFF0 07FF FFFF"
  330.         $"07FF FFFF 07FF FFFF 07FF FFFF 07FF FFFF"
  331.         $"07FF FFFF 07FF FF1F 07FF FF07 07FF FF00"
  332.         $"07FF FF00 03FF FE00 01FF FC00 00FF F800"
  333.     }
  334. };
  335.  
  336. resource 'ICN#' (129) {
  337.     {
  338.         $"00FF F800 0100 0400 0200 0200 040F 0100"
  339.         $"041F 8100 043F C100 047F E100 04FF F100"
  340.         $"04FF F100 04FF F100 04FF F100 047F E100"
  341.         $"043F C100 041F 8100 040F 0100 0400 0100"
  342.         $"0400 0100 040F 0100 0410 8100 0420 4100"
  343.         $"0440 2100 0480 1100 0480 1100 0480 1100"
  344.         $"0480 1100 0440 2100 0420 4100 0410 8100"
  345.         $"040F 0100 0200 0200 0100 0400 00FF F800",
  346.  
  347.         $"00FF F800 01FF FC00 03FF FE00 07FF FF00"
  348.         $"07FF FF00 07FF FF00 07FF FF00 07FF FF00"
  349.         $"07FF FF00 07FF FF00 07FF FF00 07FF FF00"
  350.         $"07FF FF00 07FF FF00 07FF FF00 07FF FF00"
  351.         $"07FF FF00 07FF FF00 07FF FF00 07FF FF00"
  352.         $"07FF FF00 07FF FF00 07FF FF00 07FF FF00"
  353.         $"07FF FF00 07FF FF00 07FF FF00 07FF FF00"
  354.         $"07FF FF00 03FF FE00 01FF FC00 00FF F800"
  355.     }
  356. };
  357.  
  358.  
  359. // This really messes up 7.0a12, so I've commented it out.
  360.  
  361. //data 'ics#' (128) {
  362. //    $"0000 0000 0000 0000 0000 0000 0000 0000"            /* ................ */
  363. //    $"0000 0000 0000 0000 0000 0000 0000 0000"            /* ................ */
  364. //    $"0000 0000 0000 0000 0000 0000 0000 0000"            /* ................ */
  365. //    $"0000 0000 0000 0000 0000 0000 0000 0000"            /* ................ */
  366. //};
  367.  
  368. data 'icl4' (128) {
  369.     $"0000 0000 FFFF FFFF FFFF F000 0000 0000"            /* ................ */
  370.     $"0000 000F DDDD DDDD DDDD DF00 0000 0000"            /* ................ */
  371.     $"0000 00FD DDDD DDDD DDDD DDF0 0000 0000"            /* ................ */
  372.     $"0000 0FDD DDDD 3333 DDDD DDDF 0000 0000"            /* ......33........ */
  373.     $"0000 0FDD DDD3 3333 3DDD DDDF 0000 0000"            /* .....”33=....... */
  374.     $"0000 0FDD DD33 3333 33DD DDDF 0000 0000"            /* .....3333....... */
  375.     $"0000 0FDD D333 3333 333D DDDF 0000 0000"            /* ....”3333=...... */
  376.     $"0000 0FDD 3333 3333 3333 DDDF 0000 0000"            /* ....333333...... */
  377.     $"0000 0FDD 3333 3333 3333 DDDF 0000 0000"            /* ....333333...... */
  378.     $"0000 0FDD 3333 3333 3333 DDDF 0000 0000"            /* ....333333...... */
  379.     $"0000 0FDD 3333 3333 3333 DDDF 0000 0000"            /* ....333333...... */
  380.     $"0000 0FDD D333 3333 333D DDDF 0000 0000"            /* ....”3333=...... */
  381.     $"0000 0FDD DD33 3333 33DD DDDF 0000 0000"            /* .....3333....... */
  382.     $"0000 0FDD DDD3 3333 3DDD DDDF 0000 0000"            /* .....”33=....... */
  383.     $"0000 0FDD DDDD 3333 DDFF FFFF 0000 0000"            /* ......33........ */
  384.     $"0000 0FDD DDDD DDDD DF00 0000 F000 0000"            /* ................ */
  385.     $"0000 0FDD DDDD DDDD F000 0000 0F00 0000"            /* ................ */
  386.     $"0000 0FDD DDDD 888F 00FF 0000 00F0 0000"            /* ......àè........ */
  387.     $"0000 0FDD DDD8 888F FF00 F000 000F 0000"            /* .....ÿàè........ */
  388.     $"0000 0FDD DD88 FFF0 0FFF FFFF F000 FFFF"            /* .....à.......... */
  389.     $"0000 0FDD D888 88F0 00FF 0000 0000 0FFF"            /* ....ÿàà......... */
  390.     $"0000 0FDD 8888 888F 0000 0000 0000 0FFF"            /* ....àààè........ */
  391.     $"0000 0FDD 8888 8888 F000 0000 0000 0FFF"            /* ....àààà........ */
  392.     $"0000 0FDD 8888 8888 8FF0 0000 0000 0FFF"            /* ....ààààè....... */
  393.     $"0000 0FDD 8888 8888 888F FFFF FFF0 0FFF"            /* ....àààààè...... */
  394.     $"0000 0FDD D888 8888 888D DDDF 000F FFFF"            /* ....ÿààààç...... */
  395.     $"0000 0FDD DD88 8888 88DD DDDF 0000 0FFF"            /* .....àààà....... */
  396.     $"0000 0FDD DDD8 8888 8DDD DDDF 0000 0000"            /* .....ÿààç....... */
  397.     $"0000 0FDD DDDD 8888 DDDD DDDF 0000 0000"            /* ......àà........ */
  398.     $"0000 00FD DDDD DDDD DDDD DDF0 0000 0000"            /* ................ */
  399.     $"0000 000F DDDD DDDD DDDD DF00 0000 0000"            /* ................ */
  400.     $"0000 0000 FFFF FFFF FFFF F000 0000 0000"            /* ................ */
  401. };
  402.  
  403. data 'icl8' (128) {
  404.     $"0000 0000 0000 0000 FFFF FFFF FFFF FFFF"            /* ................ */
  405.     $"FFFF FFFF FF00 0000 0000 0000 0000 0000"            /* ................ */
  406.     $"0000 0000 0000 00FF FAFA FAFA FAFA FAFA"            /* ................ */
  407.     $"FAFA FAFA FAFF 0000 0000 0000 0000 0000"            /* ................ */
  408.     $"0000 0000 0000 FFFA FAFA FAFA FAFA FAFA"            /* ................ */
  409.     $"FAFA FAFA FAFA FF00 0000 0000 0000 0000"            /* ................ */
  410.     $"0000 0000 00FF FAFA FAFA FAFA D7D7 D7D7"            /* ............◊◊◊◊ */
  411.     $"FAFA FAFA FAFA FAFF 0000 0000 0000 0000"            /* ................ */
  412.     $"0000 0000 00FF FAFA FAFA FAD7 D7D7 D7D7"            /* ...........◊◊◊◊◊ */
  413.     $"D7FA FAFA FAFA FAFF 0000 0000 0000 0000"            /* ◊............... */
  414.     $"0000 0000 00FF FAFA FAFA D7D7 D7D7 D7D7"            /* ..........◊◊◊◊◊◊ */
  415.     $"D7D7 FAFA FAFA FAFF 0000 0000 0000 0000"            /* ◊◊.............. */
  416.     $"0000 0000 00FF FAFA FAD7 D7D7 D7D7 D7D7"            /* .........◊◊◊◊◊◊◊ */
  417.     $"D7D7 D7FA FAFA FAFF 0000 0000 0000 0000"            /* ◊◊◊............. */
  418.     $"0000 0000 00FF FAFA D7D7 D7D7 D7D7 1D1D"            /* ........◊◊◊◊◊◊.. */
  419.     $"D7D7 D7D7 FAFA FAFF 0000 0000 0000 0000"            /* ◊◊◊◊............ */
  420.     $"0000 0000 00FF FAFA D7D7 D7D7 D7D7 1D1D"            /* ........◊◊◊◊◊◊.. */
  421.     $"D7D7 D7D7 FAFA FAFF 0000 0000 0000 0000"            /* ◊◊◊◊............ */
  422.     $"0000 0000 00FF FAFA D7D7 D7D7 D7D7 D7D7"            /* ........◊◊◊◊◊◊◊◊ */
  423.     $"D7D7 D7D7 FAFA FAFF 0000 0000 0000 0000"            /* ◊◊◊◊............ */
  424.     $"0000 0000 00FF FAFA D7D7 D7D7 D7D7 D7D7"            /* ........◊◊◊◊◊◊◊◊ */
  425.     $"D7D7 D7D7 FAFA FAFF 0000 0000 0000 0000"            /* ◊◊◊◊............ */
  426.     $"0000 0000 00FF FAFA FAD7 D7D7 D7D7 D7D7"            /* .........◊◊◊◊◊◊◊ */
  427.     $"D7D7 D7FA FAFA FAFF 0000 0000 0000 0000"            /* ◊◊◊............. */
  428.     $"0000 0000 00FF FAFA FAFA D7D7 D7D7 D7D7"            /* ..........◊◊◊◊◊◊ */
  429.     $"D7D7 FAFA FAFA FAFF 0000 0000 0000 0000"            /* ◊◊.............. */
  430.     $"0000 0000 00FF FAFA FAFA FAD7 D7D7 D7D7"            /* ...........◊◊◊◊◊ */
  431.     $"D7FA FAFA FAFA FAFF 0000 0000 0000 0000"            /* ◊............... */
  432.     $"0000 0000 00FF FAFA FAFA FAFA D7D7 D7D7"            /* ............◊◊◊◊ */
  433.     $"FAFA F4F4 FFFF FFFF 0000 0000 0000 0000"            /* ................ */
  434.     $"0000 0000 00FF FAFA FAFA FAFA FAFA FAFA"            /* ................ */
  435.     $"FAF4 0707 0707 0707 FF00 0000 0000 0000"            /* ................ */
  436.     $"0000 0000 00FF FAFA FAFA FAFA FAFA FAFA"            /* ................ */
  437.     $"FF07 0707 0707 0707 07FF 0000 0000 0000"            /* ................ */
  438.     $"0000 0000 00FF FAFA FAFA FAFA E7E7 E7F4"            /* ................ */
  439.     $"0707 FFFF 0707 0707 0707 FF00 0000 0000"            /* ................ */
  440.     $"0000 0000 00FF FAFA FAFA FAE7 BFBF BFF4"            /* ............øøø. */
  441.     $"F4F4 0000 F407 0707 0707 07FF 0000 0000"            /* ................ */
  442.     $"0000 0000 00FF FAFA FAFA E7BF FFFF FF07"            /* ...........ø.... */
  443.     $"07F4 F4F4 F4F4 F4F4 F407 0707 FFFF FFFF"            /* ................ */
  444.     $"0000 0000 00FF FAFA FAE7 BFBF BFBF FF07"            /* ..........øøøø.. */
  445.     $"0707 F4F4 0707 0707 0707 0707 07FF FFFF"            /* ................ */
  446.     $"0000 0000 00FF FAFA E7BF BFBF BFBF BFFF"            /* .........øøøøøø. */
  447.     $"0707 0707 0707 0707 0707 0707 07FF FFFF"            /* ................ */
  448.     $"0000 0000 00FF FAFA E7BF BFBF BFBF BFBF"            /* .........øøøøøøø */
  449.     $"FF07 0707 0707 0707 0707 0707 07FF FFFF"            /* ................ */
  450.     $"0000 0000 00FF FAFA E7BF BFBF BFBF BFBF"            /* .........øøøøøøø */
  451.     $"BFFF FF07 0707 0707 0707 0707 07FF FFFF"            /* ø............... */
  452.     $"0000 0000 00FF FAFA E7BF BFBF BFBF BFBF"            /* .........øøøøøøø */
  453.     $"BFBF BFFF FFFF FFFF FFFF FF07 07FF FFFF"            /* øøø............. */
  454.     $"0000 0000 00FF FAFA FABF BFBF BFBF BFBF"            /* .........øøøøøøø */
  455.     $"BFBF BFFA FAFA FAFF 0000 00FF FFFF FFFF"            /* øøø............. */
  456.     $"0000 0000 00FF FAFA FAFA BFBF BFBF BFBF"            /* ..........øøøøøø */
  457.     $"BFBF FAFA FAFA FAFF 0000 0000 00FF FFFF"            /* øø.............. */
  458.     $"0000 0000 00FF FAFA FAFA FABF BFBF BFBF"            /* ...........øøøøø */
  459.     $"BFFA FAFA FAFA FAFF 0000 0000 0000 0000"            /* ø............... */
  460.     $"0000 0000 00FF FAFA FAFA FAFA BFBF BFBF"            /* ............øøøø */
  461.     $"FAFA FAFA FAFA FAFF 0000 0000 0000 0000"            /* ................ */
  462.     $"0000 0000 0000 FFFA FAFA FAFA FAFA FAFA"            /* ................ */
  463.     $"FAFA FAFA FAFA FF00 0000 0000 0000 0000"            /* ................ */
  464.     $"0000 0000 0000 00FF FAFA FAFA FAFA FAFA"            /* ................ */
  465.     $"FAFA FAFA FAFF 0000 0000 0000 0000 0000"            /* ................ */
  466.     $"0000 0000 0000 0000 FFFF FFFF FFFF FFFF"            /* ................ */
  467.     $"FFFF FFFF FF00 0000 0000 0000 0000 0000"            /* ................ */
  468. };
  469.  
  470. resource 'CURS' (oappCursor) {
  471.     $"0000 0000 38F0 4510 4510 4530 38D0 0000"
  472.     $"0000 79E0 4510 4510 4510 79E0 4100 4100",
  473.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
  474.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF",
  475.     {8, 6}
  476. };
  477.  
  478. resource 'CURS' (odocCursor) {
  479.     $"0010 0010 38F0 4510 4510 4510 38F0 0000"
  480.     $"0000 0000 38E0 4510 4500 4500 38F0 0000",
  481.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
  482.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF",
  483.     {8, 6}
  484. };
  485.  
  486. resource 'CURS' (pdocCursor) {
  487.     $"0010 0010 78F0 4510 4510 4510 78F0 4000"
  488.     $"4000 0000 38E0 4510 4500 4500 38F0 0000",
  489.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
  490.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF",
  491.     {8, 6}
  492. };
  493.  
  494. resource 'CURS' (quitCursor) {
  495.     $"0000 0000 3D10 4510 4510 4510 3CE0 0400"
  496.     $"1440 0040 10E0 1040 1040 1040 1030 0000",
  497.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
  498.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF",
  499.     {8, 6}
  500. };
  501.  
  502. resource 'CURS' (ansrCursor) {
  503.     $"0000 0000 3D60 4590 4510 4D10 3510 0000"
  504.     $"0000 0000 3D60 4190 3900 0500 7900 0000",
  505.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
  506.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF",
  507.     {8, 6}
  508. };
  509.  
  510. resource 'CURS' (mvfwCursor) {
  511.     $"0000 0000 7910 5510 5510 54A0 5440 0000"
  512.     $"1000 2800 2150 7150 2150 2150 20A0 0000",
  513.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
  514.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF",
  515.     {8, 6}
  516. };
  517.  
  518. resource 'CURS' (echoCursor) {
  519.     $"0000 0000 38E0 4510 7D00 4100 38F0 0000"
  520.     $"4000 4000 58E0 6510 4510 4510 44E0 0000",
  521.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
  522.     $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF",
  523.     {8, 6}
  524. };
  525.  
  526.  
  527.  
  528. /****************** Help Resources added by Zz *******************************/
  529. resource 'STR#' (mApple) {
  530.     {
  531. /*  1 */    "Displays version and other information about this application."
  532.     };
  533. };
  534.  
  535.  
  536. resource 'hmnu' (mApple, "\0x14") {
  537.     HelpMgrVersion,                    /* Help Version                            */
  538.     0,                                /* options                                */
  539.     0,                                /* theProc                                */
  540.     0,                                /* variant                                */
  541.     HMSkipItem {                    /* skip missing msg                        */
  542.         },
  543.     {
  544.         /* Menu title */
  545.         HMStringResItem {
  546.             mApple,0,                /* menu item message                    */
  547.             mApple,0,                /* disabled item message                */
  548.             mApple,0,                /* reserved message                        */
  549.             mApple,0                /* reserved message                        */
  550.         },
  551.  
  552.         /* About… item */
  553.         HMStringResItem {
  554.             mApple,1,                /* menu item message                    */
  555.             mApple,1,                /* disabled item message                */
  556.             mApple,0,                /* reserved message                        */
  557.             mApple,0                /* reserved message                        */
  558.         }
  559.     };
  560. };
  561.  
  562. resource 'STR#' (mFile) {
  563.     {
  564. /*  1 */    "Operations related to file handling.",
  565.  
  566. /*  2 */    "Creates a new file.",
  567. /*  3 */    "Creates a new file.  To enable this item, choose Close from the File menu.",
  568. /*  4 */    "Opens an existing file.",
  569. /*  5 */    "Opens an existing file.  To enable this item, choose Close from the File menu.",
  570. /*  6 */    "Closes the current file.",
  571. /*  7 */    "Closes the current file.  To enable this item, choose New or Open from the "
  572.             "File menu.",
  573. /*  8 */    "Saves the current file.",
  574. /*  9 */    "Saves the current file.  To enable this item, choose New or Open from the "
  575.             "File menu.",
  576. /* 10 */    "Saves the current file under a different name.",
  577. /* 11 */    "Saves the current file under a different name.  (Not currently supported by "
  578.             "this application…)",
  579. /* 12 */    "Reverts to the last saved version of the current file.",
  580. /* 13 */    "Reverts to the last saved version of the current file.  (Not currently "
  581.             "supported by this application…)",
  582. /* 14 */    "Sets up paper size, orientation, and other printing options.",
  583. /* 15 */    "Sets up paper size, orientation, and other printing options.  To enable "
  584.             "this item, choose New or Open from the File menu.",
  585. /* 16 */    "Prints all or part of the current file.",
  586. /* 17 */    "Prints all or part of the current file.  To enable this item, choose New "
  587.             "or Open from the File menu.",
  588. /* 18 */    "Quit from this application."
  589.     }
  590. };
  591.  
  592. resource 'hmnu' (mFile, "File") {
  593.     HelpMgrVersion,                    /* Help Version                            */
  594.     0,                                /* options                                */
  595.     0,                                /* theProc                                */
  596.     0,                                /* variant                                */
  597.     HMSkipItem {                    /* skip missing msg                        */
  598.         },
  599.     {
  600.         /* File */
  601.         HMStringResItem {
  602.             mFile,1,                /* menu title message                    */
  603.             mFile,1,                /* disabled title message                */
  604.             mFile,0,                /* reserved message                        */
  605.             mFile,0                    /* reserved message                        */
  606.         },
  607.  
  608.         /* New */
  609.         HMStringResItem {
  610.             mFile,2,                /* menu item message                    */
  611.             mFile,3,                /* disabled item message                */
  612.             mFile,0,                /* reserved message                        */
  613.             mFile,0                    /* reserved message                        */
  614.         },
  615.  
  616.         /* Open */
  617.         HMStringResItem {
  618.             mFile,4,                /* menu item message                    */
  619.             mFile,5,                /* disabled item message                */
  620.             mFile,0,                /* reserved message                        */
  621.             mFile,0                    /* reserved message                        */
  622.         },
  623.  
  624.         /* Disabled Line */
  625.         HMSkipItem {                /* skip missing msg                        */
  626.         },
  627.  
  628.         /* Close */
  629.         HMStringResItem {
  630.             mFile,6,                /* menu item message                    */
  631.             mFile,7,                /* disabled item message                */
  632.             mFile,0,                /* reserved message                        */
  633.             mFile,0                    /* reserved message                        */
  634.         },
  635.  
  636.         /* Save */
  637.         HMStringResItem {
  638.             mFile,8,                /* menu item message                    */
  639.             mFile,9,                /* disabled item message                */
  640.             mFile,0,                /* reserved message                        */
  641.             mFile,0                    /* reserved message                        */
  642.         },
  643.  
  644.         /* Save As… */
  645.         HMStringResItem {
  646.             mFile,10,                /* menu item message                    */
  647.             mFile,11,                /* disabled item message                */
  648.             mFile,0,                /* reserved message                        */
  649.             mFile,0                    /* reserved message                        */
  650.         },
  651.  
  652.         /* Revert */
  653.         HMStringResItem {
  654.             mFile,12,                /* menu item message                    */
  655.             mFile,13,                /* disabled item message                */
  656.             mFile,0,                /* reserved message                        */
  657.             mFile,0                    /* reserved message                        */
  658.         },
  659.  
  660.         /* Disabled Line */
  661.         HMSkipItem {                /* skip missing msg                        */
  662.         },
  663.  
  664.         /* Page Setup… */
  665.         HMStringResItem {
  666.             mFile,14,                /* menu item message                    */
  667.             mFile,15,                /* disabled item message                */
  668.             mFile,0,                /* reserved message                        */
  669.             mFile,0                    /* reserved message                        */
  670.         },
  671.  
  672.         /* Print */
  673.         HMStringResItem {
  674.             mFile,16,                /* menu item message                    */
  675.             mFile,17,                /* disabled item message                */
  676.             mFile,0,                /* reserved message                        */
  677.             mFile,0                    /* reserved message                        */
  678.         },
  679.  
  680.         /* Disabled Line */
  681.         HMSkipItem {                /* skip missing msg                        */
  682.         },
  683.  
  684.         /* Quit */
  685.         HMStringResItem {
  686.             mFile,18,                /* menu item message                    */
  687.             mFile,0,                /* disabled item message                */
  688.             mFile,0,                /* reserved message                        */
  689.             mFile,0                    /* reserved message                        */
  690.         }
  691.     }
  692. };
  693.  
  694.  
  695. resource 'STR#' (mEdit) {
  696.     {
  697. /*  1 */    "Editing operations.",
  698.  
  699. /*  2 */    "Undo the last operation.",
  700. /*  3 */    "Undo the last operation.  (Not currently supported by this application…)",
  701. /*  4 */    "Cuts the current selection.",
  702. /*  5 */    "Cuts the current selection.  (Not currently supported by this application…)",
  703. /*  6 */    "Copies the current selection.",
  704. /*  7 */    "Copies the current selection.  (Not currently supported by this application…)",
  705. /*  8 */    "Pastes the current selection.",
  706. /*  9 */    "Pastes the current selection.  (Not currently supported by this application…)",
  707. /* 10 */    "Clears the current selection.",
  708. /* 11 */    "Clears the current selection.  (Not currently supported by this application…)"
  709.     }
  710. };
  711.  
  712. resource 'hmnu' (mEdit, "Edit") {
  713.     HelpMgrVersion,                    /* Help Version                            */
  714.     0,                                /* options                                */
  715.     0,                                /* theProc                                */
  716.     0,                                /* variant                                */
  717.     HMSkipItem {                    /* skip missing msg                        */
  718.         },
  719.     {
  720.         /* Edit */
  721.         HMStringResItem {
  722.             mEdit,1,                /* menu title message                    */
  723.             mEdit,1,                /* disabled title message                */
  724.             mEdit,0,                /* reserved message                        */
  725.             mEdit,0                    /* reserved message                        */
  726.         },
  727.  
  728.         /* Undo */
  729.         HMStringResItem {
  730.             mEdit,2,                /* menu item message                    */
  731.             mEdit,3,                /* disabled item message                */
  732.             mEdit,0,                /* reserved message                        */
  733.             mEdit,0                    /* reserved message                        */
  734.         },
  735.  
  736.         /* Disabled Line */
  737.         HMSkipItem {                /* skip missing msg                        */
  738.         },
  739.  
  740.         /* Cut */
  741.         HMStringResItem {
  742.             mEdit,4,                /* menu item message                    */
  743.             mEdit,5,                /* disabled item message                */
  744.             mEdit,0,                /* reserved message                        */
  745.             mEdit,0                    /* reserved message                        */
  746.         },
  747.  
  748.         /* Copy */
  749.         HMStringResItem {
  750.             mEdit,6,                /* menu item message                    */
  751.             mEdit,7,                /* disabled item message                */
  752.             mEdit,0,                /* reserved message                        */
  753.             mEdit,0                    /* reserved message                        */
  754.         },
  755.  
  756.         /* Paste */
  757.         HMStringResItem {
  758.             mEdit,8,                /* menu item message                    */
  759.             mEdit,9,                /* disabled item message                */
  760.             mEdit,0,                /* reserved message                        */
  761.             mEdit,0                    /* reserved message                        */
  762.         },
  763.  
  764.         /* Clear */
  765.         HMStringResItem {
  766.             mEdit,10,                /* menu item message                    */
  767.             mEdit,11,                /* disabled item message                */
  768.             mEdit,0,                /* reserved message                        */
  769.             mEdit,0                    /* reserved message                        */
  770.         }
  771.  
  772.     }
  773. };
  774.  
  775.  
  776. resource 'STR#' (mLight, "Traffic") {
  777.     {
  778. /*  1 */    "Control the traffic light window.",
  779.  
  780. /*  2 */    "Make the light red.",
  781. /*  3 */    "Make the light red.  To enable this item, choose New or Open from the File menu.",
  782. /*  4 */    "Make the light red.  The item is checked now because the light is already red.",
  783.  
  784. /*  5 */    "Make the light green.",
  785. /*  6 */    "Make the light green.  To enable this item, choose New or Open from the File menu.",
  786. /*  7 */    "Make the light green.  The item is checked now because the light is already green."
  787.     }
  788. };
  789.  
  790. resource 'hmnu' (mLight, "Traffic") {
  791.     HelpMgrVersion,                        /* Help Version                            */
  792.     0,                                    /* options                                */
  793.     0,                                    /* theProc                                */
  794.     0,                                    /* variant                                */
  795.     HMSkipItem {                        /* skip missing msg                        */
  796.         },
  797.     {
  798.         /* Traffic */
  799.         HMStringResItem {
  800.             mLight,1,                    /* menu title message                    */
  801.             mLight,1,                    /* disabled title message                */
  802.             mLight,0,                    /* reserved message                        */
  803.             mLight,0                    /* reserved message                        */
  804.         },
  805.  
  806.         /* Red */
  807.         HMStringResItem {
  808.             mLight,2,                    /* menu item message                    */
  809.             mLight,3,                    /* disabled item message                */
  810.             mLight,4,                    /* checked message                        */
  811.             mLight,0                    /* reserved message                        */
  812.         },
  813.  
  814.         /* Green */
  815.         HMStringResItem {
  816.             mLight,5,                    /* menu item message                    */
  817.             mLight,6,                    /* disabled item message                */
  818.             mLight,7,                    /* reserved message                        */
  819.             mLight,0                    /* reserved message                        */
  820.         }
  821.     }
  822. };
  823.  
  824.  
  825. resource 'STR#' (mSendEvent, "Apple Events") {
  826.     {
  827. /*  1 */    "Operations related to Apple Events.  This includes sending events to "
  828.             "applications, as well as choosing the application to recieve the events.",
  829. /*  2 */    "The target of these AppleEvent messages is determined by selecting an "
  830.             "application from a dialog box. Selecting this item causes the target "
  831.             "to be this application only.",
  832. /*  3 */    "The target of these AppleEvent messages is currently this application. "
  833.             "Selecting this item will allow you to choose the target application "
  834.             "from a dialog box.",
  835. /*  4 */    "Send a Close message to this application.",
  836. /*  5 */    "Send a Close message to this application. (Sorry, but I have no idea "
  837.             "why this is disabled or how to enable it…)",
  838. /*  6 */    "Send a MoveWindow message to this application.",
  839. /*  7 */    "Send a MoveWindow message to this application.  To enable this item, "
  840.             "choose New or Open from the File menu.",
  841. /*  8 */    "Select this item to send 1000 empty AppleEvent messages and see how "
  842.             "long it takes.",
  843. /*  9 */    "Modifies the Speed Test to use the “No reply” mode of AESend.",
  844. /* 10 */    "Modifies the Speed Test to use the “Wait reply” mode of AESend.",
  845. /* 11 */    "Modifies the Speed Test to use the “Queue reply” mode of AESend.",
  846.     }
  847. };
  848.  
  849.  
  850. resource 'hmnu' (mSendEvent, "Apple Events") {
  851.     HelpMgrVersion,                        /* Help Version                            */
  852.     0,                                    /* options                                */
  853.     0,                                    /* theProc                                */
  854.     0,                                    /* variant                                */
  855.     HMSkipItem {                        /* skip missing msg                        */
  856.         },
  857.     {
  858.         /* Apple Events */
  859.         HMStringResItem {
  860.             mSendEvent,1,                /* menu title message                    */
  861.             mSendEvent,1,                /* disabled title message                */
  862.             mSendEvent,0,                /* reserved message                        */
  863.             mSendEvent,0                /* reserved message                        */
  864.         },
  865.  
  866.         /* Choose target */
  867.         HMStringResItem {
  868.             mSendEvent,2,                /* menu item message                    */
  869.             mSendEvent,0,                /* disabled item message                */
  870.             mSendEvent,3,                /* enabled and checked                    */
  871.             mSendEvent,0                /* enabled and other                    */
  872.         },
  873.  
  874.         /* Disabled Line */
  875.         HMSkipItem {                    /* skip missing msg                        */
  876.         },
  877.  
  878.         /* Send a Close message */
  879.         HMStringResItem {
  880.             mSendEvent,4,                /* menu item message                    */
  881.             mSendEvent,5,                /* disabled item message                */
  882.             mSendEvent,0,                /* reserved message                        */
  883.             mSendEvent,0                /* reserved message                        */
  884.         },
  885.  
  886.         /* Send a MoveWindow message */
  887.         HMStringResItem {
  888.             mSendEvent,6,                /* menu item message                    */
  889.             mSendEvent,7,                /* disabled item message                */
  890.             mSendEvent,0,                /* reserved message                        */
  891.             mSendEvent,0                /* reserved message                        */
  892.         },
  893.         
  894.         /* Disabled Line */
  895.         HMSkipItem {                    /* skip missing msg                        */
  896.         },
  897.  
  898.         /* Speed Test */
  899.         HMStringResItem {
  900.             mSendEvent,8,                /* menu item message                    */
  901.             mSendEvent,0,                /* disabled item message                */
  902.             mSendEvent,0,                /* reserved message                        */
  903.             mSendEvent,0                /* reserved message                        */
  904.         },
  905.  
  906.         /* Speed Test */
  907.         HMStringResItem {
  908.             mSendEvent,9,                /* menu item message                    */
  909.             mSendEvent,0,                /* disabled item message                */
  910.             mSendEvent,9,                /* checked message                        */
  911.             mSendEvent,0                /* reserved message                        */
  912.         },
  913.  
  914.         /* Speed Test */
  915.         HMStringResItem {
  916.             mSendEvent,10,                /* menu item message                    */
  917.             mSendEvent,0,                /* disabled item message                */
  918.             mSendEvent,10,                /* checked message                        */
  919.             mSendEvent,0                /* reserved message                        */
  920.         },
  921.  
  922.         /* Speed Test */
  923.         HMStringResItem {
  924.             mSendEvent,11,                /* menu item message                    */
  925.             mSendEvent,0,                /* disabled item message                */
  926.             mSendEvent,11,                /* checked message                        */
  927.             mSendEvent,0                /* reserved message                        */
  928.         },
  929.  
  930.     }
  931. };
  932.  
  933.  
  934. /************* hwin resource for the Traffic Light window *************************/
  935. resource 'hwin' (rWindow, preload) {
  936.     HelpMgrVersion,            /* Help Version                            */
  937.     0,                        /* options                                */
  938.     {
  939.         rWindow,             /* ID of help resource to be used.             */
  940.         'hrct',             /* Type of help resource to be used.         */
  941.         7,                     /* Length to use when comparing titles.     */
  942.         "Untitled"            /* Name of window attached to this resource. */
  943.     }
  944. };
  945.  
  946. resource 'hrct' (rWindow, preload) {
  947.     HelpMgrVersion,            /* Help Version                            */
  948.     0,                        /* options                                */
  949.     0,
  950.     0,
  951.     {
  952.  
  953.         HMStringItem {
  954.             {115, 60},
  955.             {0, 0, 230, 120},
  956.             "Click anywhere in this window to change the traffic signal."
  957.         }
  958.     }
  959. };
  960.